A QR code is a bi-dimensional “barcode”. It is well know that a barcode expresses information with alternating black and white bars of different widths, and the black-white transition occurs along a direction crossing the longitudinal direction of the bars. When a barcode is to be detected and identified, it is scanned in said direction. That is, a barcode is uni-dimensional.
In contrast, a QR code expresses information with small bars distributed bi-dimensionally in a square area. If a barcode is considered to have one row of information, then a QR code has many rows of information.
As shown in FIG. 1, a QR code 52 comprises three location symbols 54, two timing cell lines 58 and one ending point 50. The location symbols 54, the timing cell lines and the ending point are used in detecting the QR code and in initialization of the information identifying process, and the square area defined by them is the content area 56 containing the information to be expressed by the QR code.
At the present, a timing cell line 58 is comprised of alternating black and white dots equally spaced, and a location symbol is comprised of a black square 54c surrounded by a white square frame 54b, which is further surrounded by a black square frame 54a. Any line crossing two opposite sides of the central black square 54c will be cut into 5 sections by the edges of the square and the frames, and the ratio of the 5 sections is 1:1:3:1:1, and hereinafter is referred to as the characteristic ratio. FIG. 2.1 shows three exemplary lines (a), (b) and (c) (including a diagonal (b)) crossing two opposite lines of the central square 54c, and FIG. 2.2 shows the waveform formed by scanning the location symbol along said lines, and the characteristic ratio is reflected therein.
When the information in a QR code is to be read out, the area containing the QR code is scanned and a binary image is obtained (or a binary image containing the QR code may already exist). Then the location symbols are detected, and thus the location of the QR code is determined with the location symbols together with the timing cell lines and the ending point. Consequently, the content area is identified and the content therein may be read out.
Conventionally, a QR code is used as a label or the like and functions to provide some brief information of the labeled object. The amount of such information is small. In such a case, generally there is only one QR code on an article and it is sufficient for the operator to scan the small area containing the QR code.
Correspondingly, the conventional method and apparatus for locating a QR code can only operate a small region image with the size of one or two inches during capturing or reading images, and the operator must manually or semi-automatically focus the scanner on the very portion of the QR code image to capture the right position of the QR code. Moreover, the conventional solution can only locate one QR code each time and it can only combine three location symbols.
However, as the latest development, the QR code now is used to express more and more information and an image will contain a plurality of QR codes, for example as shown in FIG. 3. In such a case, the conventional locating solution will no longer work.
Furthermore, just as shown in FIG. 2.1 and FIG. 2.2, the conventional locating solution uses center and corner scan lines to locate the QR code, and such a method is very unreliable.
Another defect of the conventional solution is that it can only locate main black color QR code that is positively oriented, just as shown in FIG. 1. If the QR code is reversed or is placed in any other orientation, or if the image is inverted in color, then the conventional solution will not work.